## Not run:
# suppressMessages(library(cubfits, quietly = TRUE))
#
# ### Get individual of phi.Obs.
# GM <- apply(yassour[, -1], 1, function(x) exp(mean(log(x[x != 0]))))
# phi.Obs.all <- yassour[, -1] / sum(GM) * 15000
# phi.Obs.all[phi.Obs.all == 0] <- NA
#
# ### Run optimization.
# X <- log(as.matrix(phi.Obs.all))
# param.init <- list(K = 2, prop = c(0.95, 0.05), mu = c(-0.59, 3.11),
# sigma2 = c(1.40, 0.59), sigma2.e = 0.03)
# ret <- mixnormerr.optim(X, K = 2, param = param.init)
# print(ret)
# ## End(Not run)
Run the code above in your browser using DataLab